<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table>
		<tr>
			<th>商品id</th>
			<th>商品名</th>
			<th>商品生产商</th>
			<th>商品类型</th>
			<th>商品价格</th>
			<th>商品库存</th>
			<th>功能</th>
		</tr>
		<c:forEach items="${page.data}" var="goods">
			<tr>
				<td>${goods.goodsId}</td>
				<td>${goods.goodsName}</td>
				<td>${goods.goodsFactory}</td>
				<td>${goods.goodsType}</td>
				<td>${goods.goodsPrice}</td>
				<td>${goods.goodsNum}</td>
				<td><a href="deleGoods.do?goodsId=${goods.goodsId}">删除</a></td>
			</tr>
		</c:forEach>
	</table>
	<c:if test="${page.hasPrev}">
		<a href="getGoods.do?pageNum=${page.pageNum-1}">上一页</a>
	</c:if>
	<c:forEach begin="1" end="${page.totalPages}" var="n">
		<a href="getGoods.do?pageNum=${n}">${n}</a>
	</c:forEach>
	<c:if test="${page.hasNext}">
		<a href="getGoods.do?pageNum=${page.pageNum+1}">下一页</a>
	</c:if>
</body>
</html>